In a video picture encoding process in the prior art, an encoder needs to perform a spatial transform for original picture block data or predicted picture block difference data, perform a quantization operation for a transform coefficient, and then perform entropy encoding for the quantized coefficient. A decoder performs an inverse quantization operation for the coefficient obtained after entropy decoding, reconstructs the coefficient to obtain a transform coefficient, and then performs an inverse transform operation to obtain the original picture block data or picture block difference data.
To perform an inverse quantization operation, the decoder needs to obtain a quantization step (QStep) used in the quantization process at the encoder. Therefore, the encoder needs to write information about the used Qstep into a bit stream. Because different Qsteps may be indicated by different quantization parameters (QP, Quantization Parameter), the encoder may encode the QP and transmit it to the decoder.
In a high efficiency video coding test model (HM, High efficiency video coding test Model), a picture is divided into largest coding units (LCU, Largest Coding Unit) of an equal size, where, each LCU may include one or more CUs of non-fixed sizes.
In a picture encoding method in the prior art, a minimum block allowed to have an independent QP is an LCU, that is, each LCU corresponds to a QP.
During encoding, the encoder describes QP related information in a picture parameter set (PPS, Picture Parameter Set) as follows:
pic_parameter_set_rbsp( ) { ... pic_init_qp_minus26 /* relative to 26 */ ...}
The description in a slice header (SH, Slice Header) is:
slice_header( ) { ... slice_qp_delta ...}
The description in an LCU is:
coding_tree( x0, y0, log2CUSize ) { ... if( !skip_flag[ x0 ][ y0 ] )   lcu_qp_delta ...}
After the encoder completes encoding in the preceding manner, the encoded data is sent to the decoder. For each LCU, the decoder calculates the quantization parameter QPLCU of the current LCU in the following manner:QPLCU=lcu_qp_delta+slice_qp_delta+pic_init_qp_minus26+26.
The decoder may perform decoding after obtaining the QPLCU of the current LCU.
As may be seen from the solution of the prior art:
In the prior art, each LCU corresponds to a QP; when performing bit rate control by adjusting the QP, the encoder can only use the LCU as the finest granularity for control. Because the LCU in actual applications is usually set to a large size, for example, 64*64 pixels (which is hereinafter abbreviated to 64*64 for ease of description; other data is similar to this), the solution of the prior art affects the precision of bit rate control.
In another picture encoding method in the prior art, each CU in an LCU carries qp_delta information of the CU, so that the precision of bit rate control may be improved.
However, in the prior art, because the minimum CU may be set to 8*8, if each CU carries the qp_delta information of the CU, the encoding overhead is greatly increased, and hence the overall compression efficiency in picture encoding is affected.